package com.lin.chapter9;

public class NvWa {
	public static void main(String[] args) {
		HumanFactory maleHumanFactory = new MaleFactory();
		HumanFactory femaleHumanFactory = new FemaleFactory();

		Human maleYellowHuman = maleHumanFactory.createYellowHuman();
		Human femaleyellowHuman = femaleHumanFactory.createYellowHuman();
		System.out.println("---生产一个黄色女性---");
		femaleyellowHuman.getColor();
		femaleyellowHuman.getSex();
		femaleyellowHuman.talk();
		System.out.println("---生产一个黄色男性---");
		maleYellowHuman.getColor();
		maleYellowHuman.getSex();
		maleYellowHuman.talk();
	}
}
